//
//  config.h
//  MVideo
//
//  Created by Lin Eidan on 13-9-26.
//  Copyright (c) 2013年 taomee. All rights reserved.
//

#pragma mark - APP Info


#define ISDEBUG             1  //0表示不是调试模式，是线上模式 ,1表示调试模式
#define IOSData             1 //真假数据   目前1是假数据,已经用到1.
#define APPVersion          @"1.0"


#if ISDEBUG
#   define BaiDuReportKey       @"0"
#   define ISSandBox            @"1"
#   define NSLog(FORMAT, ...) fprintf(stderr,"%s [%d lines] %s\n",__PRETTY_FUNCTION__, __LINE__,[[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
#else
#   define BaiDuReportKey       @"68ae2b9e5a"
#   define ISSandBox            [NSString stringWithFormat:@"%d",(![kHandle sharedInstance].isShowTrueView)]
#   define NSLog(FORMAT, ...) nil  //Disable NSLog
//#   define NSLog(FORMAT, ...) fprintf(stderr,"%s [%d lines] %s\n",__PRETTY_FUNCTION__, __LINE__,[[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);

#endif

#define AppleAppID              @"888598732"//After releae Apple give u link ID
#define BaiDuApiKey             @"7Vn4ofjmXUOReQV2a6xCWqPW"
#define WXAppID                 @"wx07c2dbee08ce7e0c"
#define QQAppKey                @"101082838"
#define SinaAppKey              @"661604136"

#define API_BASE                ([NSString stringWithFormat:@"http://kuiba.haomee.net/?m=Api&pf=2&ios=%d&a=",IOSData])
#define ShareURL                ([NSString stringWithFormat:@"https://itunes.apple.com/cn/app/id%@", AppleAppID])


#pragma -mark 提示信息

#define TipsFailedTextVideo                 @"大侠，片子有点不给力(>_<)"
#define TipsHandleDowanloadIn3GText         @"大侠，3G下不能下载，请去系统设置中更改"
#define TipsChangeTo3GText                  @"大侠，曲境中断，是否使用2G/3G继续播放？"

#define ShareDefaultUrl                 @"http://www.guotang.mobi"
#define ShareUrl                        @"http://kuiba.haomee.net/?a=directUrl"
#define ShareTitle                      @"魁拔"
#define ShareImageUrl                   @"http://manhua.tmcdn.net/kuiba/res/image/page/123421.png"

#define NotifyNoWX                      @"大侠，你还没安装微信哟！"
#define NotifyNoQQ                      @"大侠，你还没安装QQ哟！"
#define NotifyShareSuccess              @"分享成功"
#define NotifyShareError                @"分享失败"

#define NotifyLoginFirst                @"请先登录"
#define NotifyTitleWarning              @"警告！"
#define NotifyTitlSuceess               @"报告大侠"
#define NotifyNormal                    @"少侠"
#define NotifyNoNet                     @"曲境中断，您与天界好像失去联系了"
#define Notify2GOr3G                    @"您的手机在2G/3G环境，蛮吉请您注意流量"
#define NotifyPaperDownError            @"请确认是否授权蛮吉可以使用您的相册？"
#define NotifyPaperDownSuccess          @"您的专属壁纸，蛮吉已经替您保存至相册"
#define NotifyVipError                  @"少侠，前来抢购的地界生物太多，您未购买成功，请稍后再试。"
#define NotifyVipSuccess                @"恭喜，蛮吉已将魁拔币放入你的腰包！。"
#define NotifyVideoNotOpen              @"表捉急，大片未上映！"
#define NotifyVideoNotDownButDel        @"不要乱点，讨厌啦！"
#define NotifyVersionHaveNO             @"新的脉门还未开启，还要继续修炼"
#define NotifyVersionHave               @"要不要开启新的脉门？"
#define NotifyCacheClear                @"你的包裹里缓存过多，是否需要清理？"
#define NotifyFeedBackSuccess           @"神圣联军已经收到您的意见，我们将召开特别会议讨论"
#define NotifyRecommendShare           ([NSString stringWithFormat:@"#魁拔妖侠传# 【史上吊炸天的动画片】宇宙的漏洞-魁拔，有史以来最万万没想到的异常生物再次复活！兄弟姐妹们，一起进入魁拔世界成为史上最伟大的妖侠吧！么么哒！官方APP独家下载:%@ @魁拔妖侠传 @魁拔",ShareUrl])

#define NotifyGetWYShare(name)          ([NSString stringWithFormat:@"洒家刚刚在《魁拔》中获得了<%@>，怎么样也算是地界中有纹耀的人物，@魁拔 终有一天将会被我打败！蛮吉么么哒！阿里么么哒！兄弟姐妹么么哒！强烈推荐(%@)",name,ShareUrl])


#define NotifyPaperShare                ([NSString stringWithFormat:@"#魁拔妖侠传# 魁拔是天地的错误，宇宙的漏洞！魁拔再次复活！史上最吊的魁拔壁纸，永远都是我有你无！我在@魁拔 官方APP中选择了自己的最爱，你还在看什么，还不赶紧来下!（%@）",ShareUrl])

#define NotifyMessage        @"#魁拔妖侠传# 【史上吊炸天的动画片】宇宙的漏洞-魁拔，有史以来最万万没想到的异常生物再次复活！兄弟姐妹们，一起进入魁拔世界成为史上最伟大的妖侠吧！么么哒！"

#define NotifyIsNotVip                 @"诏书上还没有你的名字"
#define NotifyNoMessage                @"少侠不要着急，还未收到召唤"


#define NotifyInvalidPhone              @"系统无法识别你的手机号码"
#define NotifyInvalidPW                 @"你的密码不符合要求"
#define NotifyLoginFaild                @"你的用户名与密码不匹配"
#define NotifyLoginSuccess              @"欢迎进入元泱境界"
#define NotifyThirdAuthorizeFaild       @"通往元泱境界的路上迷失方向"
#define NotifyGetCodeInvalid            @"获取验证码失败"
#define NotifyGetCodeTooMany            @"今天获取验证码过多，请明天重试"
#define NotifyPhoneHasRegister          @"此手机号已经注册"
#define NotifyPhoneHasBind              @"此手机号已绑定相同平台的其他账号"
#define NotifyPhoneNotRegister          @"此手机号还没有注册"
#define NotifyCheckCodeFailed           @"大侠，你的验证码有误"
#define NotifyBindFaild                 @"通往元泱境界的道路在维修中"
#define NotifyRegisterFaild             @"注册失败"
#define NotifyResetPwFaild              @"重设密码失败"
#define NotifyResetPwSuccess            @"密码设置成功，请重新登录"
#define NotifyCanNotChangPhone          @"无法更改手机号"
#define NotifyInputNewPhoneNum          @"请输入新手机号"
#define NotifyThirdBindSuccess          @"恭喜你到达元泱境界！"
#define NotifyThirdAccoutHasBeenUsed    @"大侠，你的船票已被使用"
#define NotifyThirdUnBindSuccess        @"大侠，你已顺利离开元泱境界"
#define NotifyThirdUnBindFailed         @"大侠，离开元泱境界的道路被封锁了"
#define NotifyUploadHeadFailed          @"大侠，严肃点！掀起你的头盖骨再来一张！"
#define NotifyUserNameValid             @"昵称长度必须大于1"
#define NotifyUserNameHasExist          @"该昵称已经存在"
#define NotifyUserInfoEditSuccess       @"个人信息编辑成功"
#define NotifyUserInfoEditFailed        @"个人信息编辑失败"
#define NotifyChangeNameAlertTitle      @"大侠，入住小店要先登记哦！"
#define NotifyChangePhoneSuccess        @"你的手机号码更改成功！"
#define NotifyChangePhoneFailed         @"你的手机号码更改失败！"
#define NotifyGetCameraFailed           @"大侠，雾太大找不着望远镜啦！"
#define NotifyGetPhotoLibFailed         @"大侠，你的记忆无法读取"
#define NotifyDownloadDataInitFailed    @"数据加载失败"
#define NotifyDownloadDataDelSuccess    @"启动光势ing → 地界生物清理成功"
#define NotifyDownloadDataCanNotDel     @"不要乱点，讨厌啦！"
#define NotifyIAPFailed                 @"未被纳入诏书，大侠再来一发？"
#define NotifyIAPSuccess                @"么么哒,祝你登上国王诏书，成为盟军一员！"



#define kApp ((AppDelegate *)[UIApplication sharedApplication].delegate)
#define kUser [NSUserDefaults standardUserDefaults]
#define userManager [UserObj sharedInstance]

#define kScreen_Height ([UIScreen mainScreen].bounds.size.height)
#define kScreen_Width ([UIScreen mainScreen].bounds.size.width)
#define kScreen_Frame    (CGRectMake(0, 0 ,kScreen_Width,kScreen_Height))

#define isiOS6 ([[[UIDevice currentDevice] systemVersion] intValue] ==6)
#define isiOS7 ([[[UIDevice currentDevice] systemVersion] intValue] >=7)

#define isiPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
#define isPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)

#define ColorWithHex(rgbValue) ([UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0])
#define ColorWithHexAlpha(rgbValue,a) ([UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:(a)])

#define RGBA(R, G, B, A)        [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A]
#define RGB(R,G,B)              [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:1.0]
#define IntToString(i)          [NSString stringWithFormat:@"%d",i]
#define StringAdd(x,y)          [NSString stringWithFormat:@"%@%@",x,y]
#define IsNull(object)          (((object)==nil||(object)==NULL||[object isKindOfClass:[NSNull class]])? YES : NO)
#define FileSize(file)          [[NSData dataWithContentsOfFile:file] length]
#define IsArray(obj)            ([obj isKindOfClass:[NSArray class]])
#define IsDictionary(obj)       ([obj isKindOfClass:[NSDictionary class]])


#pragma mark - 本地缓存

#define LocalCarouseData       @"LocalCarouseData"  //轮播图存储
#define LocalNewsData          @"LocalNewsData"     //资讯存储
#define LocalOldNewsData       @"LocalOldNewsData"  //已读信息存储
#define LocalIntroData         @"LocalIntroData"    //魁拔简介存储
#define LocalVideoData         @"LocalVideoData"    //视频页存储
#define LocalSystemData        @"LocalSystemData"  //系统信心存储
#define LocalSystemMaxId       @"LocalSystemMaxId" //最大id
#define LocalHistoryData       @"LocalHistoryData"  //播放纪录
#define FirstToPlayVideo       @"FirstToPlayVideo"  //引导
#define IsAllowedDownloadIn3G  @"IsAllowedDownloadIn3G"
#define IsAllowedPush          @"IsAllowedPush"
#define IsAllowedShowTrueView  @"IsAllowedShowTrueView"

#pragma -mark 本地缓存 Download

#define VideoObjContentId         @"000"
#define DownloadVideoQueue        @"downloadVideoQueue"
